debian/rules: clean up stale gpg-agent processes after testing
authorSimon McVittie <smcv@debian.org>
Thu, 31 Mar 2016 08:21:59 +0000 (09:21 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 31 Mar 2016 08:21:59 +0000 (09:21 +0100)
debian/changelog
debian/rules

index af52d2d038404bb13d750b01ed69f2d27120bf7c..1854104662e46fc48d1921cd0b10afed13cf93c0 100644 (file)
@@ -9,6 +9,7 @@ ostree (2016.4-1) UNRELEASED; urgency=medium
   * Fix ITP bug number in changelog (was #813308, should have been #697477)
   * debian/control: build-depend on attr, for the tests (only required if
     /var/tmp supports extended attributes)
+  * debian/rules: clean up stale gpg-agent processes after testing
   * debian/rules: warn if there are leftover daemon processes after testing
   * debian/patches: add patches to get the build-time tests passing under
     sbuild
index 38f748e54485aee9b81c0d8216e43cf4435d8cf1..e999af75cb649fe42a31087759c6b4d7e17794b6 100755 (executable)
@@ -26,6 +26,8 @@ override_dh_auto_configure:
 
 override_dh_auto_test:
        dh_auto_test
+       # One test creates multiple GPG homedirs, each with its own agent
+       pkill --full "gpg-agent --homedir /var/tmp/tap-test\\.[^/]+/repo/tmp/ostree-gpg-[^/]+ " || :
        if pgrep lt-ostree || pgrep --full "gpg-agent --homedir /var/tmp/tap-test."; then \
                echo "WARNING: daemon processes were leaked"; \
                pgrep gpg-agent | xargs --no-run-if-empty ps ww; \